package DesignPatern.A07_原型模式.QSB.A01基本模式;

/**
 * @Author: Du
 * @Date: 2021/7/22 11:45
 */
public class Mail implements Cloneable
{
    private String receiver;
    private String subject;
    private String application;
    private String context;
    private String tail;
    
    public Mail(AdvTemplate advTemplate)
    {
        this.context = advTemplate.getAdvContext();
        this.subject = advTemplate.getAdvSubject();
    }
    
    @Override
    public Mail clone()
    {
        Mail mail = null;
        try
        {
            mail = (Mail) super.clone();
        } catch (CloneNotSupportedException e)
        {
            e.printStackTrace();
        }
        return mail;
    }
    
    public String getReceiver()
    {
        return receiver;
    }
    
    public void setReceiver(String receiver)
    {
        this.receiver = receiver;
    }
    
    public String getSubject()
    {
        return subject;
    }
    
    public void setSubject(String subject)
    {
        this.subject = subject;
    }
    
    public String getApplication()
    {
        return application;
    }
    
    public void setApplication(String application)
    {
        this.application = application;
    }
    
    public String getContext()
    {
        return context;
    }
    
    public void setContext(String context)
    {
        this.context = context;
    }
    
    public String getTail()
    {
        return tail;
    }
    
    public void setTail(String tail)
    {
        this.tail = tail;
    }
}
